<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<%@include file="/common/javascript.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>作业题目选择</title>
    <script type="text/javascript">
    var myGridManager = null;
    $(function () {
       $("#maingrid4").ligerGrid({
            columns: [
      				{ display: '布置作业编码', name: 'id', align: 'left', width:'10%', minWidth: 90 },
    				{ display: '作业题目名称', name: 'title', width:'10%',minWidth: 110 },
    				{ display: '课程编码', name: 'courseId', width:'10%',minWidth: 90 },
    				{ display: '课程名称', name: 'courseName',width:'10%', minWidth: 110 },
    				{ display: '老师编号', name: 'terId',width:'5%', minWidth: 90 },
    				{ display: '老师名称', name: 'terName',width:'5%', minWidth: 110 }
            ],  pageSize:10,
            dataAction: 'server', url: '${ctx}/qso/homeworkSubmit/listHWKHView', sortName: 'cid',
            width: '100%', height: '80%', numPerPage:20,rownumbers:true,
            checkbox:true
        }); 
       myGridManager=$("#maingrid4").ligerGetGridManager();
        $("#pageloading").hide();
    });
    
    function selectOK(){
    	var rows = myGridManager.getCheckedRows();
    	var num=rows.length;
    	var row=myGridManager.getSelected();
    	if (1 == num ) {
    		window.parent.callBackOK(row);
    	}else{
    		$.ligerDialog.warn('请选择一行');
    	}
    }
    
    function selectCancel(){
    	window.parent.callBackCancel();
    }
    </script>
</head>
<body style="padding:6px; overflow:hidden;">
  <div class="l-clear"></div>
    <div id="maingrid4" style="margin-top:0px;"></div>
	<div class="l-dialog-buttons" style="">
		<div class="l-dialog-buttons-inner">
			<div class="l-dialog-btn">
				<div class="l-dialog-btn-l"></div>
				<div class="l-dialog-btn-r"></div>
				<div class="l-dialog-btn-inner" onclick="selectCancel()">取消</div>
			</div>
			<div class="l-dialog-btn">
				<div class="l-dialog-btn-l"></div>
				<div class="l-dialog-btn-r"></div>
				<div class="l-dialog-btn-inner" onclick="selectOK()">提交</div>
			</div>
			<div class="l-clear"></div>
		</div>
	</div>
  <div style="display:none;">
</body>
</html>
